/*--------------------------------------------------------------------------
 *  Copyright 2011 Taro L. Saito
 *
 *  Licensed under the Apache License, Version 2.0 (the "License");
 *  you may not use this file except in compliance with the License.
 *  You may obtain a copy of the License at
 *
 *     http://www.apache.org/licenses/LICENSE-2.0
 *
 *  Unless required by applicable law or agreed to in writing, software
 *  distributed under the License is distributed on an "AS IS" BASIS,
 *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 *  See the License for the specific language governing permissions and
 *  limitations under the License.
 *--------------------------------------------------------------------------*/
//--------------------------------------
// XerialJ
//
// SilkFastWriter.java
// Since: 2011/06/27 15:07:31
//
// $URL$
// $Author$
//--------------------------------------
package org.xerial.silk.writer;

import java.io.IOException;
import java.io.Writer;

import org.xerial.util.log.Logger;

public class SilkFastWriter implements SilkRawWriter
{
    private static Logger _logger     = Logger.getLogger(SilkFastWriter.class);
    private Writer        out;
    private int           indentLevel = 0;

    public SilkFastWriter(Writer out) {
        this.out = out;
    }

    @Override
    public void flush() throws IOException {
        this.out.flush();
    }

    @Override
    public void endDocument() throws IOException {
        flush();
    }

    @Override
    public void close() throws IOException {
        this.out.close();
    }

    private void indent() throws IOException {
        for (int i = 0; i < indentLevel; ++i) {
            this.out.append(' ');
        }
    }

    @Override
    public SilkRawWriter preamble() throws IOException {
        indent();
        out.append("%silk - version:2.0");
        return this;
    }

    @Override
    public SilkRawWriter preamble(String anyText) throws IOException {
        // TODO Auto-generated method stub
        return null;
    }

    @Override
    public SilkRawWriter comment(String comment) throws IOException {
        // TODO Auto-generated method stub
        return null;
    }

    @Override
    public SilkRawWriter node(String nodeName) throws IOException {
        // TODO Auto-generated method stub
        return null;
    }

    @Override
    public SilkRawWriter typedNode(String nodeName, String typeName) throws IOException {
        // TODO Auto-generated method stub
        return null;
    }

    @Override
    public SilkRawWriter attribute(String nodeName) throws IOException {
        // TODO Auto-generated method stub
        return null;
    }

    @Override
    public SilkRawWriter attribute(String attributeName, String attributeValue) throws IOException {
        // TODO Auto-generated method stub
        return null;
    }

    @Override
    public SilkRawWriter nodeValue(String value) throws IOException {
        // TODO Auto-generated method stub
        return null;
    }

    @Override
    public SilkRawWriter leaf(String nodeName) throws IOException {
        // TODO Auto-generated method stub
        return null;
    }

    @Override
    public SilkRawWriter leaf(String nodeName, int value) throws IOException {
        // TODO Auto-generated method stub
        return null;
    }

    @Override
    public SilkRawWriter leaf(String nodeName, short value) throws IOException {
        // TODO Auto-generated method stub
        return null;
    }

    @Override
    public SilkRawWriter leaf(String nodeName, float value) throws IOException {
        // TODO Auto-generated method stub
        return null;
    }

    @Override
    public SilkRawWriter leaf(String nodeName, byte value) throws IOException {
        // TODO Auto-generated method stub
        return null;
    }

    @Override
    public SilkRawWriter leaf(String nodeName, double value) throws IOException {
        // TODO Auto-generated method stub
        return null;
    }

    @Override
    public SilkRawWriter leaf(String nodeName, char value) throws IOException {
        // TODO Auto-generated method stub
        return null;
    }

    @Override
    public SilkRawWriter leaf(String nodeName, boolean value) throws IOException {
        // TODO Auto-generated method stub
        return null;
    }

    @Override
    public SilkRawWriter write(Object obj) throws IOException {
        // TODO Auto-generated method stub
        return null;
    }

    @Override
    public SilkRawWriter dataLine(String dataLine) throws IOException {
        // TODO Auto-generated method stub
        return null;
    }

    @Override
    public SilkRawWriter text(String text) throws IOException {
        // TODO Auto-generated method stub
        return null;
    }

    @Override
    public SilkRawWriter registerType(Class< ? > type) throws IOException {
        // TODO Auto-generated method stub
        return null;
    }

    @Override
    public SilkRawWriter write(String nodeName, Object nodeValue) throws IOException {
        // TODO Auto-generated method stub
        return null;
    }

    @Override
    public SilkRawWriter commentLine(String comment) {
        // TODO Auto-generated method stub
        return null;
    }

    @Override
    public SilkRawWriter toSilk(Object obj) throws IOException {
        // TODO Auto-generated method stub
        return null;
    }

    @Override
    public SilkRawWriter leaf(String nodeName, String value) throws IOException {
        // TODO Auto-generated method stub
        return null;
    }

}
